package com.amqp.demo.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AmqpController {

    @Autowired
    private AmqpService amqpService;

    @PostMapping("/sendMsg")
    public String sendMesg(@RequestBody  String msg){
        amqpService.sendMsg(msg);
        return "ok";
    }
}
